home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Vk / VkWindow.z / VkWindow
Encoding:
Text File  |  2002-10-03  |  12.6 KB  |  331 lines

  1.  
  2.  
  3.  
  4. VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))                                                      VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      VkWindow - Base class for all top-level windows with menus
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      VkSimpleWindow : VkComponent : VkCallbackObject
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <Vk/VkWindow.h>
  16.  
  17. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  18.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  19.               VkWindow(const char *name,
  20.                        ArgList args = NULL,
  21.                        Cardinal argCount = 0);
  22.  
  23.               virtual ~VkWindow();
  24.  
  25.  
  26.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr ---- VVVViiiieeeewwwwKKKKiiiitttt 2222....1111 oooonnnnllllyyyy
  27.               VkWindow(const char *name,
  28.                        VkScreen   *screen,
  29.                        ArgList args = NULL,
  30.                        Cardinal argCount = 0);
  31.  
  32.  
  33.    AAAAddddddddiiiinnnngggg mmmmeeeennnnuuuussss
  34.               void       setMenuBar(VkMenuBar *menuObj);
  35.               void       setMenuBar(VkMenuDesc *menudesc);
  36.               void       setMenuBar(VkMenuDesc *menudesc,
  37.                                     XtPointer clientData);
  38.  
  39.               VkSubMenu *addMenuPane(const char *name);
  40.               VkSubMenu *addMenuPane(const char *name,
  41.                                      VkMenuDesc *desc);
  42.  
  43.               VkRadioSubMenu *addRadioMenuPane(const char *name);
  44.               VkRadioSubMenu *addRadioMenuPane(const char *name,
  45.                                                VkMenuDesc *desc);
  46.  
  47.  
  48.    AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
  49.               virtual VkMenuBar   *menu() const;
  50.               virtual const char  *className();
  51.               static VkMenuBar    *getMenu(VkComponent *object);
  52.               static VkWindow     *getWindow(VkComponent *component);
  53.  
  54.  
  55. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  56.      The VkWindow class exhibits similar behavior as VkSimpleWindow except
  57.      that it provides additional support for a menubar, based on the VkMenuBar
  58.      class and related VkMenuItem classes. Menus can be added from outside the
  59.      class, using the public protocol, but it is generally recommended that
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))                                                      VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))
  71.  
  72.  
  73.  
  74.      menus be added by derived classes to maintain encapsulation of all
  75.      operations associated with a window. The VkWindow class automatically
  76.      causes a help menu pane to be added to all menu bars.
  77.  
  78.    DDDDeeeerrrriiiivvvviiiinnnngggg SSSSuuuubbbbccccllllaaaasssssssseeeessss
  79.      Class can be derived in much the same way as classes derived from
  80.      VkSimpleWindow. Views can be added by either calling addView in the
  81.      constructor or by defining a setUpInterface() member function. Menus may
  82.      also be added either in the constructor, or in the setUpInterface()
  83.      member function, depending on whether or not there is an advantage to
  84.      delaying menu creation until the window is shown. The cost of creating
  85.      menus in advance is small, since the widgets associated with a hierarchy
  86.      of VkMenuItems is never built until the menu is displayed.
  87.  
  88.      The following example adds a menu pane named "Application" to a window's
  89.      menubar. The pane supports a single action, which exits the application.
  90.  
  91.           #include <Vk/VkApp.h>
  92.           #include <Vk/VkSimpleWindow.h>
  93.           #include <Vk/VkRadioBox.h>
  94.           #include <Vk/VkSubMenu.h>
  95.  
  96.           class SampleWindow: public VkSimpleWindow {
  97.  
  98.             private:
  99.  
  100.                 static void quitCallback(Widget, XtPointer, XtPointer);
  101.  
  102.             public:
  103.  
  104.               SampleWindow ( const char *name ) : VkSimpleWindow ( name )
  105.               {
  106.                   VkRadioBox *rb = new VkRadioBox("check", mainWindowWidget());
  107.  
  108.                rb->addItem("one");
  109.                rb->addItem("two");
  110.                rb->addItem("three");
  111.                rb->addItem("four");
  112.  
  113.                   addView(rb);
  114.  
  115.                   // Add a menu pane
  116.  
  117.                   VkSubMenu *pane = addMenuPane("Application");
  118.                   pane->addAction("Quit", &SampleWindow::quitCallback, (XtPointer) this);
  119.                }
  120.  
  121.               // Destructor, className() functions not provided
  122.           };
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))                                                      VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))
  137.  
  138.  
  139.  
  140. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  141.    VVVVkkkkWWWWiiiinnnnddddoooowwww
  142.                VkWindow(const char *name,
  143.                         ArgList argList = NULL,
  144.                         Cardinal argCount = 0);
  145.  
  146.  
  147.           The VkWindow constructor simply initializes internal data members
  148.           and calls the VkSimpleWindow constructor.
  149.  
  150.    VVVVkkkkWWWWiiiinnnnddddoooowwww ---- VVVViiiieeeewwwwKKKKiiiitttt 2222....1111 oooonnnnllllyyyy
  151.                VkWindow(const char *name,
  152.                         VkScreen *screen,
  153.                         ArgList argList = NULL,
  154.                         Cardinal argCount = 0);
  155.  
  156.  
  157.           Creates an instance of VkWindow on the specified VkScreen.
  158.  
  159.    ~~~~VVVVkkkkWWWWiiiinnnnddddoooowwww
  160.                virtual ~VkWindow();
  161.  
  162.  
  163.           Destroys all memory allocated by this class. If this object has an
  164.           of instance of VkMenuBar installed, it is destroyed as well,
  165.           regardless of who created it.
  166.  
  167.    sssseeeettttMMMMeeeennnnuuuuBBBBaaaarrrr
  168.               void       setMenuBar(VkMenuBar *menuObj);
  169.               void       setMenuBar(VkMenuDesc *menudesc);
  170.  
  171.  
  172.           This function installs a VkMenuBar object as the window's menubar.
  173.           The menubar may be specified as an instance of VkMenuBar, or
  174.           provided as a description of a menu hierarchy. See VkMenuBar(3X).
  175.  
  176.    aaaaddddddddMMMMeeeennnnuuuuPPPPaaaannnneeee
  177.               VkSubMenu *addMenuPane(const char *name);
  178.               VkSubMenu *addMenuPane(const char *name, VkMenuDesc *desc);
  179.  
  180.  
  181.           This function adds a named menu pane to the window's menu bar An
  182.           optional menu description of the contents may be supplied. If no
  183.           menu bar is currently installed, one is created automatically.
  184.  
  185.    aaaaddddddddRRRRaaaaddddiiiiooooMMMMeeeennnnuuuuPPPPaaaannnneeee
  186.               VkRadioSubMenu *addRadioMenuPane(const char *name);
  187.               VkRadioSubMenu *addRadioMenuPane(const char *name, VkMenuDesc *desc);
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))                                                      VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))
  203.  
  204.  
  205.  
  206.           This function adds a menu pane that supports toggle items and has
  207.           radio behavior. An optional menu description of the contents may be
  208.           supplied.  If no menu bar is currently installed, one is created
  209.           automatically.
  210.  
  211.    mmmmeeeennnnuuuu(((())))
  212.               virtual VkMenuBar *menu() const;
  213.  
  214.  
  215.           Returns a pointer to a VkWindow object's menu instance.
  216.  
  217.    ggggeeeettttMMMMeeeennnnuuuu(((())))
  218.            static VkMenuBar *getMenu(VkComponent *object);
  219.  
  220.  
  221.           This static member function returns the menubar used by the window
  222.           that contains the given VkComponent. This allows components to add
  223.           items to menubars of windows in which they are placed, without a
  224.           hard coded connection between the window and the component.
  225.  
  226.    ggggeeeettttWWWWiiiinnnnddddoooowwww(((())))
  227.            static VkSimpleWindow *getWindow(VkComponent *component);
  228.  
  229.  
  230.           Returns the VkWindow object (or subclass) that contains the given
  231.           VkComponent.  This allows components to operate on the window in
  232.           which they are contained, without a hard coded connection between
  233.           the window and the component.
  234.  
  235.    ccccllllaaaassssssssNNNNaaaammmmeeee
  236.               virtual const char* className();
  237.  
  238.  
  239.           This class's class name is "VkWindow".
  240.  
  241. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  242. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  243.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkSSSSiiiimmmmpppplllleeeeWWWWiiiinnnnddddoooowwww
  244.           afterRealizeHook(), show(), hide(), *(), setUpWindowProperties(),
  245.           stateChanged(), handleWmDeleteMessage(), handleRawEvent(),
  246.           VkSimpleWindow(), ~VkSimpleWindow(), addView(), addView(),
  247.           removeView(), open(), raise(), lower(), iconize(), iconify(),
  248.           getTitle(), setTitle(), setIconName(), setClassHint(), iconic(),
  249.           visible(), mainWindowWidget(), viewWidget(), _iconState,
  250.           _visibleState, _stackingState, _mainWindowWidget,
  251.  
  252.  
  253.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
  254.           installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
  255.           setDefaultResources(), getResources(), realize(), manage(),
  256.           unmanage(), name(), baseWidget(), okToQuit(), isComponent(), _name,
  257.           _baseWidget, _w, deleteCallback
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))                                                      VVVVkkkkWWWWiiiinnnnddddoooowwww((((3333xxxx))))
  269.  
  270.  
  271.  
  272.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
  273.           callCallbacks(), addCallback(), removeCallback(),
  274.           removeAllCallbacks()
  275.  
  276.  
  277. KKKKNNNNOOOOWWWWNNNN DDDDEEEERRRRIIIIVVVVEEEEDDDD CCCCLLLLAAAASSSSSSSSEEEESSSS
  278.      VkMsgWindow
  279.  
  280. CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  281.      VkMenu, VkMenuBar, VkMenuItem
  282.  
  283. KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  284.      VkGraph
  285.  
  286. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  287.      VkSimpleWindow, VkComponent, VkCallbackObject, VkGraph, VkMenu,
  288.      VkMenuBar, VkMenuItem
  289.      _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  290.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
  291.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
  292.      _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.